{include file="../../../application/admin/view/public/head" /}
<div class="page-container p10">


    <div class="my-toolbar-box" >
        <div class="center mb10">
            <form class="layui-form " action="{:url()}" method="post">
                <div class="layui-input-inline">
                    <select class="layui-select" name="app_id">
                        <option value="">全部</option>
                        {foreach $applists as $appId =>$appName}
                        <option value="{$appId}"
                                {if $appId == $param.app_id}
                                selected
                                {/if}
                        >{$appName}</option>

                        {/foreach}
                    </select>
                </div>

                <button class="layui-btn mgl-20 j-search" >查询</button>
            </form>
        </div>
        <blockquote class="layui-elem-quote">
            截止 昨日({:date('Y-m-d',strtotime('yesterday'))}) 可疑用户广告和视频播放统计
        </blockquote>
        <div class="layui-btn-group">
            <a data-href="/tianyiabd.php/admin/ulog/batchsetupdate.html" class="layui-btn layui-btn-primary j-page-btns confirm"><i class="layui-icon">&#xe640;</i>批量开启升级提示</a>

        </div>
    </div>
     <form class="layui-form " method="post" id="pageListForm">
         <table class="layui-table" lay-size="sm">
            <thead>
            <tr>
                <th width="25"><input type="checkbox" lay-skin="primary" lay-filter="allChoose"></th>
                <th width="80">应用名称</th>
                <th width="80">设备编号</th>
                <th width="100">注册天数</th>
                <th width="100">广告访问次数</th>
                <th width="100">影视访问次数</th>
                <th width="100">操作</th>
            </tr>
            </thead>

            {volist name="list" id="vo"}
            <tr>
                <td><input type="checkbox" name="ids[]" value="{$vo.app_id}$$${$vo.device_id}" class="layui-checkbox checkbox-ids" lay-skin="primary"></td>
                <td>{$vo.app_name}<br/>[{$vo.app_id}]</td>
                <td>{$vo.device_id}<br/>{$vo.device_name} - {$vo.is_need_updated}<br/>积分：{$vo.points}<br>
                    {if $vo.time_expired>0}
                    过期日期：{$vo.time_expired|date='Y-m-d H:i:s'}
                    {else}
                    未兑换免广告
                    {/if}
                </td>
                <td>
<!--                    14天内登陆：{$vo.login_days}<br/>-->
                    注册天数：{$vo.sign_days}<br/>
                </td>
                <td>
                    合计： {$vo.kaiping_num + $vo.quanping_num + $vo.jili_num}<br/>
                    开屏广告： {$vo.kaiping_num|default=0}<br/>
                    全屏广告： {$vo.quanping_num|default=0}<br/>
                    激励广告： {$vo.jili_num|default=0}
                </td>
                <td>
                    合计： {$vo.vod_num + $vo.zhibo_num}<br/>
                    影视： {$vo.vod_num}<br/>
                    直播： {$vo.zhibo_num}
                </td>
                <td>
                    <a data-full="1" data-href="{:url('devicelog')}?device_id={$vo.device_id}&app_id={$vo.app_id}" class="layui-btn layui-btn-primary j-iframe"><i class="layui-icon">&#xe6ed;
                    </i> 观影记录 </a>
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>

        <div id="pages" class="center"></div>

    </form>
</div>

{include file="../../../application/admin/view/public/foot" /}


<script type="text/javascript">
    var curUrl="{:url('ulog/keyidevices',$param)}";
    layui.use(['laypage', 'layer','laydate'], function() {
        var laypage = layui.laypage
                , layer = layui.layer,laydate=layui.laydate;
        laydate.render({
            elem: '#startTime'
            ,type: 'datetime'
        });
        laydate.render({
            elem: '#endTime'
            ,type: 'datetime'
        });
        laypage.render({
            elem: 'pages'
            ,count: {$total}
            ,limit: {$limit}
            ,curr: {$page}
            ,layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
            ,jump: function(obj,first){
                if(!first){
                    location.href = curUrl.replace('%7Bpage%7D',obj.curr).replace('%7Blimit%7D',obj.limit);
                }
            }
        });
    });
</script>
</body>
</html>